import request from '@/utils/request'

export const GetBrandPage = (pageNum, pageSize) => {
  return request({
    url: `/admin/product/brand/page/${pageNum}/${pageSize}`,
    method: 'get',
  })
}

export const GetAllBrand = () => {
  return request({
    url: `/admin/product/brand/findAll`,
    method: 'get',
  })
}

export const DeleteBrandById = id => {
  return request({
    url: `/admin/product/brand/deleteById/${id}`,
    method: 'delete',
  })
}

export const GetBrandById = id => {
  return request({
    url: `/admin/product/brand/getById/${id}`,
    method: 'get',
  })
}

export const UpdateBrandById = brand => {
  return request({
    url: `/admin/product/brand/updateById`,
    method: 'put',
    data: brand,
  })
}

export const SaveBrand = brand => {
  return request({
    url: `/admin/product/brand/save`,
    method: 'post',
    data: brand,
  })
}
